package com.ruoyi.purchase.mapper;

import com.ruoyi.purchase.domain.Supplier;

import java.util.List;

/**
 * SupplierMapper接口
 * 
 * @author kevinness
 * @date 2025-02-02
 */
public interface SupplierMapper 
{
    /**
     * 查询Supplier
     * 
     * @param supplierCode Supplier主键
     * @return Supplier
     */
    public Supplier selectSupplierBySupplierCode(String supplierCode);

    /**
     * 查询Supplier列表
     * 
     * @param supplier Supplier
     * @return Supplier集合
     */
    public List<Supplier> selectSupplierList(Supplier supplier);

    /**
     * 新增Supplier
     * 
     * @param supplier Supplier
     * @return 结果
     */
    public int insertSupplier(Supplier supplier);

    /**
     * 修改Supplier
     * 
     * @param supplier Supplier
     * @return 结果
     */
    public int updateSupplier(Supplier supplier);

    /**
     * 删除Supplier
     * 
     * @param supplierCode Supplier主键
     * @return 结果
     */
    public int deleteSupplierBySupplierCode(String supplierCode);

    /**
     * 批量删除Supplier
     * 
     * @param supplierCodes 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSupplierBySupplierCodes(String[] supplierCodes);

    /**
     * 根据用户名查询供货商信息
     *
     * @param username 用户名
     * @return 供货商信息
     */
    public Supplier selectSupplierInfoByUsername(String username);


    /**
     * 根据供货商名称查询供货商编码
     *
     * @param CompanyName 供货商名称
     * @return 供货商编码
     */
    public String selectSupplierCodeByCompanyName(String CompanyName);
}
